//
//  ApiUserBusiness.h
//  KangarooDoctor
//
//  Created by 廖罡 on 2024/1/19.
//

#import <Foundation/Foundation.h>
#import "Api.h"
#import "DataModel.h"


extern NSString *kUserPhone;
extern NSString *kUserToken;

NS_ASSUME_NONNULL_BEGIN



@interface ApiUserBusiness : NSObject

+(instancetype)shared;

@property (nonatomic, strong) NSString *phone;
@property (nonatomic, strong) NSString *token;
@property (nonatomic, strong) NSArray<GDDevice*> *deviceList;

-(void)bindingBodyTempWithImei:(NSString*)imei cb:(ApiCallback)callback;

-(void)getDeviceListWithParams:(NSDictionary * ) params  callback:(ApiCallback)callback;

-(void)getDeviceDetail:(NSString*)deviceId cb:(ApiCallback)callback;

-(void)getDeviceHighTemp:(NSString*)did cb:(ApiCallback)callback;

-(void)getDeviceTempCurve:(NSString*)did figure:(NSString*)figure cb:(ApiCallback)callback;

//GDUserInfo *info
-(void)getMyProfile:(ApiCallback)callback;

-(void)updateMyProfile:(NSDictionary*)dict cb:(ApiCallback)callback;

-(void)getOssAddress:(ApiCallback)callback;

-(void)getPressHistory:(NSString*)from to:(NSString*)to cb:(ApiCallback)callback;

-(void)updatePressData:(int)highPress
                   low:(int)lowPress
                 pulse:(int)pulse
              deviceId:(NSString *) deviceId
                    cb:(ApiCallback)callback;
- ( void ) getBpDeviceMeasureDataByDeviceId:(NSDictionary *) params callback:(ApiCallback)callback;


-(void)updateDevice:(GDDevice*)device cb:(ApiCallback)callback;

-(void)deleteDevice:(GDDevice*)device cb:(ApiCallback)callback;

-(void)getBannerList:(ApiCallback)callback;

-(void)deleteSelfAccount:(NSString*)pinCode cb:(ApiCallback)callback;

-(void) getAllBpDataByDeviceIdForWeek:(NSDictionary *) params cb:(ApiCallback)callback;
/***
    获取设备列表
 */
- ( void ) getDevicePagination;
/***
   获取设备详情
 */
- ( void ) getDeviceDetailById;
- ( void ) bindDeviceWithParams: (NSDictionary *) params callback:(ApiCallback)callback;
- ( void ) isbindedDeviceWithParams: (NSDictionary *) params callback:(ApiCallback)callback;
- ( void ) unbindDeviceWithParams: (NSDictionary *) params callback:(ApiCallback)callback;


- ( void ) loginByAccountPwd:(NSString*) username pwd:(NSString *) pwd  callback:(ApiCallback)callback;
- ( void ) loginByValidateCode:(NSString*) username code:(NSString *) code  callback:(ApiCallback)callback;
- ( void ) loginByWechat:(ApiCallback)callback;
//- ( void ) resetPassword:(ApiCallback)callback;
- ( void ) resetPasswordWithParams:(NSDictionary *) params callback :(ApiCallback)callback;
- ( void ) registerAccountWithParams:params callback:(ApiCallback)callback;
- ( void ) wechatBindPhone:(ApiCallback) callback;
- ( void ) logoutAccountWithParams: (NSDictionary *) params callback:(ApiCallback) callback;
- ( void ) addFeedBackWithParams: (NSDictionary *) params callback:(ApiCallback) callback;


- ( void ) getNewsPaginatonWithParams: (NSDictionary *) params callback:(ApiCallback)callback;
- ( void ) getNewsDetailWithParams: (NSDictionary *) params callback:(ApiCallback)callback;




@end

NS_ASSUME_NONNULL_END
